package com.cci.kangdao.task;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import com.cci.kangdao.service.GMApplyService;

@Component
public class GMRecordCheckTask {

    private Logger log = Logger.getLogger(this.getClass().getName());
	@Autowired
	private GMApplyService gmApplyService;
	
	//超时提醒
    public void overTimeNotice() {
        try {
            gmApplyService.overTimeNotice();
        } catch (Exception e) {
            log.error("定时任务overTimeNotice发生异常，异常信息" + e.getMessage(), e);
        }

	}
	
	//权限到期状态变更
    public void setApplyOverTime() {
        try {
            gmApplyService.setApplyOverTime();
        } catch (Exception e) {
            log.error("定时任务setApplyOverTime发生异常，异常信息" + e.getMessage(), e);
        }

	}

	//每日刷新的未审批的GM申请记录
    public void setGMDailyStatus() {
        try {
            gmApplyService.setGMDailyStatus();
        } catch (Exception e) {
            log.error("定时任务setGMDailyStatus发生异常，异常信息" + e.getMessage(), e);
        }
    }
}
